package com.wn.pettyloan.service.impl;

import com.wn.pettyloan.dto.EmpDto;
import com.wn.pettyloan.entity.Emp;
import com.wn.pettyloan.mapper.EmpMapper;
import com.wn.pettyloan.service.EmpService;
import com.wn.pettyloan.vo.EmpVo;
import com.wn.pettyloan.vo.RoleVo;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @program: pettyloan
 * @ClassName EmpServiceImpl
 * @description:
 * @author: 韩旭
 * @create: 2022-12-09 16:49
 **/

@Service
public class EmpServiceImpl implements EmpService {
    @Resource
    private EmpMapper empMapper;

    @Override
    public int deleteByPrimaryKey(Long id) {
        return empMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(Emp record) {
        return empMapper.insert(record);
    }

    @Override
    public int insertSelective(Emp record) {
        return empMapper.insertSelective(record);
    }

    @Override
    public Emp selectByPrimaryKey(Long id) {
        return empMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<Emp> selectAll() {
        return empMapper.selectAll();
    }

    @Override
    public List<RoleVo> selectRoleByEmp() {
        return empMapper.selectRoleByEmp();
    }

    @Override
    public int updateByPrimaryKeySelective(Emp record) {
        return empMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(Emp record) {
        return empMapper.updateByPrimaryKey(record);
    }

    @Override
    public EmpVo empLogin(EmpDto empDto) {
        return empMapper.empLogin(empDto);
    }

    @Override
    public Emp selectByUacc(String username) {
        return empMapper.selectByUacc(username);
    }
}